<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>欢迎使用移动端人力资源信息配置平台</title>
	<link rel="stylesheet" href="__PUBLIC__/Center/css/ch-ui.admin.css">
	<link rel="stylesheet" href="__PUBLIC__/Center/font/css/font-awesome.min.css">
    <link rel="shortcuticon" href="/favicon.ico" />
	<script type="text/javascript" src="__PUBLIC__/Center/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Center/js/ch-ui.admin.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Center/js/layer.js"></script>
    <script>
        $(function(){
            $('.logout').bind('click',function(){
               layer.msg('您确定要退出吗?', {
                    time: 0
                    ,btn: ['是的', '取消']
                    ,yes: function(index){
                        layer.close(index);
                        location.href = "{:U('Privilege/logout')}";
                    }
                });
                return false;
            });
            //菜单鼠标经过效果
            $('.sub_menu li').bind({
                'mouseover':function(){
                    $(this).css('background','#222222');
                    $(this).find('a').css('color','white');
                },
                'mouseout':function(){
                    $(this).css('background','');
                   $(this).find('a').css('color','');
                }
            });

			//顶级菜单排序
			$('#sort_top_menu').bind('click',function(){
				layer.open({ 
		            type: 2, 
		            area: ['400px', '520px'], 
		            fix: false, 
		            maxmin: false, 
		            content: ['__CONTROLLER__/sortTopMenu','yes']
		      	});	
			});
			
            //执行配置信息初始化操作
            $('a[name=system_reset]').bind('click',function(){
                layer.prompt({ 
                        formType: 1,
                        value: '',
                        title: '请输入授权密码'
                    },function(value, index, elem){
                        $.post("__CONTROLLER__/resetConf",{password:value},function(result){
                            if(result==false){
                                 layer.msg('密码输入有误!', {
                                    time: 0
                                    ,btn: ['ok']
                                    ,yes: function(index){
                                        layer.close(index);
                                    }
                                });
                            }else{
                                layer.msg('初始化操作执行成功!', {
                                    time: 0
                                    ,btn: ['ok']
                                    ,yes: function(index){
                                        layer.close(index);
                                    }
                                });
                                parent.location.reload();   
                            }
                        },'json');
                });
            });
        });
    </script>
</head>
<body>
	<div class="top_box">
		<div class="top_left">
			<div class="logo">中 国 航 天</div>
			<ul>
				<li><a href="{:U('Index/index')}" class="active">管理首页</a></li>
			</ul>
		</div>
		<div class="top_right">
			<ul>
				<li>管理员：<span style="color:red;font-weight:bold;"><?php echo session('center_login');?></span></li>
				<li>当前系统时间：<?php echo date('Y年m月d日 H:i:s');?></li>
				<li><a href="__CONTROLLER__/passwd" target="main">修改密码</a></li>
                <li><a href="javascript:void(0)" name="system_reset" target="main">初始化数据</a></li>
				<li><a class="logout" href="">安全退出</a></li>
			</ul>
		</div>
	</div>
	<div class="menu_box" style="overflow:auto;">
		<ul>
			<li>
				<h3 id="sort_top_menu"><i class="fa fa-fw fa-child"></i>顶级子集排序</h3>
			</li>
            <li>
            	<h3><i class="fa fa-fw fa-wrench"></i>快捷子集导航</h3>
                <ul class="sub_menu" style="display: block;">
                	<?php
                		foreach($top_list as $k => $v):
                	?>
                    <li style="text-align: center;overflow: hidden;">
                    	<a href="{:U('Index/item','name='.$v['name'])}" target="main">
                    		<?php echo $v['caption'];?>
                    	</a>
                    </li>
                    <?php
                    	endforeach;	
                    ?>
                </ul>
            </li>
		</ul>
	</div>
	<div class="main_box">
		<iframe src="{:U('Index/info')}" frameborder="0" width="100%" height="100%" name="main"></iframe> 
	</div>
	<div class="bottom_box">
		<center>神舟软件</center>
	</div>
</body>
</html>